home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
bsrc_250.zip
/
BINK.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-15
|
36KB
|
936 lines
/*--------------------------------------------------------------------------*/
/* */
/* */
/* ------------ Bit-Bucket Software, Co. */
/* \ 10001101 / Writers and Distributors of */
/* \ 011110 / Freely Available<tm> Software. */
/* \ 1011 / */
/* ------ */
/* */
/* (C) Copyright 1987-91, Bit Bucket Software Co., a Delaware Corporation. */
/* */
/* */
/* Major definitions used in BinkleyTerm */
/* */
/* */
/* For complete details of the licensing restrictions, please refer */
/* to the License agreement, which is published in its entirety in */
/* the MAKEFILE and BT.C, and also contained in the file LICENSE.250. */
/* */
/* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
/* BINKLEYTERM LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
/* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
/* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT BIT BUCKET */
/* SOFTWARE CO. AT ONE OF THE ADDRESSES LISTED BELOW. IN NO EVENT */
/* SHOULD YOU PROCEED TO USE THIS FILE WITHOUT HAVING ACCEPTED THE */
/* TERMS OF THE BINKLEYTERM LICENSING AGREEMENT, OR SUCH OTHER */
/* AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO. */
/* */
/* */
/* You can contact Bit Bucket Software Co. at any one of the following */
/* addresses: */
/* */
/* Bit Bucket Software Co. FidoNet 1:104/501, 1:343/491 */
/* P.O. Box 460398 AlterNet 7:491/0 */
/* Aurora, CO 80046 BBS-Net 86:2030/1 */
/* Internet f491.n343.z1.fidonet.org */
/* */
/* Please feel free to contact us at any time to share your comments about */
/* our software and/or licensing policies. */
/* */
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/* LEGIBLE SECTION. Definitions to make "C" look like a real language. */
/*--------------------------------------------------------------------------*/
#ifndef BINK_DEFINED
#define BINK_DEFINED
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif
#ifndef min
#define min(a,b) ((a)<=(b)?(a):(b))
#endif
/*
* updcrc macro derived from article Copyright (C) 1986 Stephen Satchell.
* NOTE: First argument must be in range 0 to 255.
* Second argument is referenced twice.
*
* Programmers may incorporate any or all code into their programs,
* giving proper credit within the source. Publication of the
* source routines is permitted so long as proper credit is given
* to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
* Omen Technology.
*/
#define updcrc(cp, crc) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))
/* We need it the other way around for BinkleyTerm */
#define xcrc(crc,cp) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))
typedef unsigned bit;
typedef unsigned int word;
typedef unsigned char byte;
#define fallthrough
#define LOCAL static
#define empty_str ""
/* The following changes by Greylock Software, to facilitate the MEWEL
* version of Bink.
*/
#define PRDCT_NM(m) PrdctTbl[m]
#define WELCOME_LEN 1024
#define POLL_POPUP
#define EventSub()
#ifdef MILQ
#include "Milq.H"
#endif
/*
* This is an attempt to clean up some of the mess. No longer will
* we ifdef MILQ simple SendMessages. This should make the code
* considerably more readable. In the context of simple Bink,
* SendMessage has no meaning.
*/
#ifndef MILQ
#define GetDlgItem(a,b) a
#define FlLnModeSet(a,b)
#define SendMessage(a,b,c,d)
#define WinClear(w)
#define WinDrawAllWindows()
#define WinSetText(a,b)
#define call_hWnd callwin
#define file_hWnd filewin
#define history_hWnd historywin
#define history_BBS historywin
#define history_Cost historywin
#define history_Fl historywin
#define history_Last historywin
#define history_Out historywin
#define hold_hWnd holdwin
#define hold_Poll holdwin
#define hold_Addr holdwin
#define hold_Init holdwin
#define hold_Hdr holdwin
#define HoldWndDtl(x) holdwin
#define settings_hWnd settingswin
#define settings_DtTm settingswin
#define settings_Evt settingswin
#define settings_Port settingswin
#define settings_MTask settingswin
#define settings_Status settingswin
#endif
/* These should be stomped out of existance. They are bad memories
* from a failed experiment. However, these should NOT be eliminated
* yet. NULL in the MEWEL environment IS NOT the same as NULL in the
* BC environment. Comparisons to NULLGLOBALPTR should NOT simply be
* changed to NULL, but rather (char far *)0.
*/
#define NULLGLOBALPTR (char far *)0
#define NULLLOCALPTR (char *)0
struct _lang_hdr
{
int ElemCnt;
int PoolSize;
};
struct _key_fnc
{
int FncIdx;
int ScanCode;
};
struct _key_fnc_hdr
{
int KeyFncCnt;
int *KeyFncAry;
struct _key_fnc *KeyFncTbl;
};
#define FA_RDONLY 0x01 /* File is readonly */
#define FA_HIDDEN 0x02 /* File is hidden */
#define FA_SYSTEM 0x04 /* System file */
#define FA_VOLID 0x08 /* Volume ID */
#define FA_SUBDIR 0x10 /* Subdirectory */
#define FA_ARCH 0x20 /* Archive file */
struct FILEINFO
{
char rsvd[21];
char attr;
long time;
long size;
char name[13];
char nill;
};
#define DENY_ALL 0
#define DENY_NONE 1
#define DENY_READ 2
#define DENY_RDWR 3
#define DENY_WRITE 4
typedef struct pnums
{
char num[20];
char pre[20];
char suf[20];
int len;
struct pnums *next;
} PN_TRNS;
typedef struct mnums
{
byte mdm;
char pre[50];
char suf[50];
struct mnums *next;
} MDM_TRNS;
struct prototable
{
char first_char;
int entry;
};
typedef struct j_types
{
char j_match[30];
struct j_types *next;
} J_TYPES, *J_TYPESP;
/* mailtypes bit field definitions */
#define MAIL_CRASH 0x0001
#define MAIL_HOLD 0x0002
#define MAIL_DIRECT 0x0004
#define MAIL_NORMAL 0x0008
#define MAIL_REQUEST 0x0010
#define MAIL_WILLGO 0x0020
#define MAIL_TRIED 0x0040
#define MAIL_TOOBAD 0x0080
#define MAIL_UNKNOWN 0x0100
#define MAIL_RES0200 0x0200
#define MAIL_QSMALL 0x0400
#define MAIL_RES0800 0x0800
#define MAIL_RES1000 0x1000
#define MAIL_RES2000 0x2000
#define MAIL_RES4000 0x4000
#define MAIL_RES8000 0x8000
typedef struct finfo
{
int info_size;
char curr_fossil;
char curr_rev;
char far *id_string;
int ibufr;
in